{% extends "base.htm" %}

{% block header_title %}用户登录{% end %}
{% block body %}
{% include "header.htm" %}
<div class="am-g">
  <div class="am-u-lg-4 am-u-md-6 am-u-sm-centered">
    <div class="am-text-center am-margin-top-lg"><h2>登录</h2></div>
    <hr>

    <form class="am-form am-form-horizontal" method="post">
      <div class="am-form-group">
        <label class="am-u-sm-3 am-form-label">用户名</label>
        <div class="am-u-sm-9">
          <input type="text" name="username" placeholder="">
        </div>
      </div>

      <div class="am-form-group">
        <label class="am-u-sm-3 am-form-label">密码</label>
        <div class="am-u-sm-9">
          <input type="password" name="password" placeholder="">
        </div>
      </div>

      {% if handler.settings['captcha']['login'] %}
      <div class="am-form-group">
        <label class="am-u-sm-3 am-form-label">验证码</label>
        <div class="am-u-sm-4">
          <img src="/captcha.png" id="captcha" height="41" />
        </div>
        <div class="am-u-sm-5">
          <input type="text" name="captcha" placeholder="">
        </div>
      </div>
      {% end %}

      <div class="am-form-group">
        <div class="am-text-right am-u-sm-12">
            <div class="am-u-sm-4">
                <a href="/forgetpwd" class="am-btn am-btn-default">忘记密码</a>
            </div>
            <div class="am-u-sm-4">
              <div class="checkbox">
                <label>
                  <input type="checkbox" name="remember"> 记住我
                </label>
              </div>
            </div>
            <div class="am-u-sm-4">
                <button type="submit" class="am-btn am-btn-secondary">登录平台</button>
            </div>
        </div>
      </div>
    {% raw xsrf_form_html() %}
    </form>

    <hr>
  </div>
</div>
{% end %}
{% block footer_static %}
    <script src="{{ static_url('assets/js/nologin.js') }}"></script>
{% end %}